@include('admin.layout.bone_header')

<div class="layui-btn-container">
    <button class="layui-btn" data-type="addImages">添加订单</button>
</div>


<table class="layui-hide" id="think-table" lay-filter="think-table"></table>



<script>

    layui.use('table', function () {
        let table = layui.table;
        UI.getPageTable(table, "{{route('admin.prices.prices')}}", [
            {field: 'pay_id', title: 'ID', width: 80, sort: true, fixed: 'left'}
            , {field: 'order_code', title: ' 订单号'}
            , {field: 'price', title: ' 订单金额'}
            , {field: 'shop_id', title: ' 商家ID'}
            , {field: 'ppp', title: ' 商家昵称',templet:function (d){
                    return d['shop_info']['businesses_title'];
                }}
            , {field: 'ppp', title: ' 用户手机号',templet:function (d){
                    return d['user_info']['phone'];
                }}
            , {field: 'bbbb', title: ' 创建时间',templet:function (d){
                    return Utils.paraseTime(d['created_at']);
                }}
        ]);

        table.on('tool(think-table)', function (obj) {
            let data = obj.data;

        });
        let $ = layui.$, active = {
            addImages:function (){
                UI.openLayer("{{route('admin.prices.add')}}",980);
            }
        };
        $('.layui-btn-container .layui-btn').on('click', function () {
            let type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });

        $('.search .layui-btn').on('click', function () {
            let type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });

    })


</script>


@include('admin.layout.bone_footer')
